
var path = require('path');
var fs = require('fs');

var packageFilePath = path.join(__dirname, 'workspaces', 'data.json');

try{
    fs.accessSync(packageFilePath, fs.R_OK);
}catch(err){
    console.log('cann not access file :'+packageFilePath);
    return;
}

var packageJSON = require(packageFilePath);

var i = 0;
for(var key in packageJSON){
    i ++;
}
console.log('sum:'+i);

